<?php

 /**
 * ACoreNetConfig
 * ACoreNetConfigWithLoginAndPassword
 *
 * @author Usenko Timur <usenko.timur@gmail.com>
 * @package net
 */

CCore::Using('base.container');

/**
 * @package net
 */
abstract class ACoreNetConfig extends ACoreBaseContainer
{
	/**
	 * @param string $sHost
	 * @param int $iPort
	 * @param int $iConnectTimeOut
	 * @param int $iSocketTimeOut
	 *
	 * @return ACoreNetConfig
	 */
	public function __construct($sHost, $iPort, $iConnectTimeOut, $iSocketTimeOut)
	{
		CCore::CheckTypes(array('$sHost', '$iPort', '$iConnectTimeOut', '$iSocketTimeOut'));

		parent::__construct();

		$this->aContainer['Host'] = $sHost;
		$this->aContainer['Port'] = $iPort;
		$this->aContainer['ConnectTimeOut'] = $iConnectTimeOut;
		$this->aContainer['SocketTimeOut'] = $iSocketTimeOut;
	}
}

/**
 * @package net
 */
abstract class ACoreNetConfigWithLoginAndPassword extends ACoreNetConfig
{
	/**
	 * @param string $sHost
	 * @param int $iPort
	 * @param string $sLogin
	 * @param string $sPassword
	 * @param int $iConnectTimeOut
	 * @param int $iSocketTimeOut
	 *
	 * @return ACoreNetConfigWithLoginAndPassword
	 */
	public function __construct($sHost, $iPort, $sLogin, $sPassword, $iConnectTimeOut, $iSocketTimeOut)
	{
		CCore::CheckTypes(array('$sHost', '$iPort', '$sLogin', '$sPassword', '$iConnectTimeOut', '$iSocketTimeOut'));

		parent::__construct($sHost, $iPort, $iConnectTimeOut, $iSocketTimeOut);

		$this->aContainer['Login'] = $sLogin;
		$this->aContainer['Password'] = $sPassword;
	}
}